﻿@using System.Threading
@using System.Web.Optimization
@using Abp.Configuration
@using Abp.Timing
@using AbpCompanyName.AbpProjectName
@using AbpCompanyName.AbpProjectName.Configuration
@using Abp.Dependency
@using Abp.Web.Mvc.Alerts
@using Abp.Web.Mvc.Extensions
@{
    Layout = null;
    SetAntiForgeryCookie();
    var uiTheme = SettingManager.GetSettingValue(AppSettingNames.UiTheme);
    AlertList alerts = null;
    IocManager.Instance.Using<IAlertManager>(alertManager => alerts = alertManager.Alerts);
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="shortcut icon" href="~/favicon.ico">

    <title>AbpProjectName</title>

    @Styles.Render("~/Bundles/vendor/css")

    <!-- View specific styles -->
    @RenderSection("styles", required: false)

    <script type="text/javascript">
        //This is used to get the application's root path from javascript. It's useful if you're running application in a virtual directory under IIS.
        var abp = abp || {}; abp.appPath = '@ApplicationPath';
    </script>
</head>
<body class="@("theme-" + uiTheme)">
    <!-- Page Loader -->
    <div class="page-loader-wrapper">
        <div class="loader">
            <div class="preloader">
                <div class="spinner-layer pl-red">
                    <div class="circle-clipper left">
                        <div class="circle"></div>
                    </div>
                    <div class="circle-clipper right">
                        <div class="circle"></div>
                    </div>
                </div>
            </div>
            <p>Please wait...</p>
        </div>
    </div>
    <!-- #END# Page Loader -->
    <!-- Overlay For Sidebars -->
    <div class="overlay"></div>
    <!-- #END# Overlay For Sidebars -->
    <!-- Search Bar -->
    <div class="search-bar">
        <div class="search-icon">
            <i class="material-icons">search</i>
        </div>
        <input type="text" placeholder="START TYPING...">
        <div class="close-search">
            <i class="material-icons">close</i>
        </div>
    </div>
    <!-- #END# Search Bar -->
    <!-- Top Bar -->
    <nav class="navbar">
        <div class="container-fluid">
            <div class="navbar-header">
                <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a>
                <a href="javascript:void(0);" class="bars"></a>
                <a class="navbar-brand" asp-controller="Home" asp-action="Index"><i class="fa fa-cubes"></i> AbpProjectName</a>
            </div>
            <div class="collapse navbar-collapse" id="navbar-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <!-- Call Search -->
                    <li><a href="javascript:void(0);" class="js-search" data-close="true"><i class="material-icons">search</i></a></li>
                    <!-- #END# Call Search -->
                    @Html.Action("LanguageSelection", "Layout")

                    <li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i class="material-icons">more_vert</i></a></li>
                </ul>
            </div>
        </div>
    </nav>
    <!-- #Top Bar -->
    <section>
        <aside id="leftsidebar" class="sidebar">

            @Html.Action("SideBarUserArea", "Layout")
            @Html.Action("SideBarNav", "Layout", new { activeMenu = ViewBag.ActiveMenu })

            <!-- Footer -->
            <div class="legal">
                <div class="copyright">
                    &copy; @DateTime.Now.Year <a href="javascript:void(0);">AbpProjectName</a>.
                </div>
                <div class="version">
                    <b>Version </b> @AppVersionHelper.Version [@AppVersionHelper.ReleaseDate.ToString("yyyyMMdd")]
                </div>
            </div>
            <!-- #Footer -->
        </aside>

        @Html.Action("RightSideBar", "Layout")

    </section>

    <section class="content">
        <div class="container-fluid">
            @if (alerts.Any())
            {
                <div id="AbpPageAlerts">
                    @foreach (var alertMessage in alerts)
                    {
                        <div class="alert alert-@alertMessage.Type.ToString().ToLower() @(alertMessage.Dismissible ? "alert-dismisable" : "")" role="alert">
                            <h4 class="alert-heading">
                                @alertMessage.Title
                                @if (alertMessage.Dismissible)
                                {
                                    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                }
                            </h4>
                            <p>@alertMessage.Text</p>
                        </div>
                    }
                </div>
            }

            @RenderBody()
        </div>
    </section>

    @Scripts.Render("~/Bundles/vendor/js/bottom")

    <script>
        //Localizing momentjs
        moment.locale('@Thread.CurrentThread.CurrentUICulture.Name');
    </script>

    <!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->
    <script src="~/api/AbpServiceProxies/GetAll?v=@(Clock.Now.Ticks)"></script>
    <script src="~/AbpScripts/GetScripts?v=@(Clock.Now.Ticks)" type="text/javascript"></script>

    <!-- SignalR scripts -->
    <script src="~/signalr/hubs"></script>
    @Html.IncludeScript("~/Abp/Framework/scripts/libs/abp.signalr.js")

    <!-- View specific scripts -->
    @RenderSection("scripts", required: false)
</body>
</html>
